﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Meqs.Entity;
using Meqs.Logic.Interface;
using System.Collections.Generic;

public partial class Education_Left : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            repeatReport.DataSource = GetReportInfo();
            repeatReport.DataBind();
        }
    }


    private List<ReporTtypeEducation> GetReportInfo()
    {
        List<ReporTtypeEducation> list = new List<ReporTtypeEducation>();
        int examId = 0, examType = 0, grade = 0;
        string s = "";

        examType = 1;
        examId = EducationCookie.ExamID;
        grade = EducationCookie.ExamGrade;

        if (grade > 0)
        {
            string[] arr = Reports.GetExamName(examType, grade);
            string[] arrKey = Reports.GetExamTypes(examType, grade);
            ReporTtypeEducation ea = new ReporTtypeEducation();
            ea.ReportName = "各校上线人数查询";
            ea.Keyword = "SCHOOLSCORE";
            list.Add(ea);
            ea = new ReporTtypeEducation();
            ea.ReportName = "各校考生排名查询";
            ea.Keyword = "SCHOOLPOSITION";
            list.Add(ea);
            int i = 0;
            foreach (string item in arr)
            {
                ReporTtypeEducation exam = new ReporTtypeEducation();
                exam.ReportName = item;
                exam.Keyword = arrKey[i];
                list.Add(exam);
                i++;
            }
        }
        return list;
    }

    public string GetHerf(string reportName)
    {
        string s = "";
        if (reportName.Trim().Equals("KINDSET"))
            s = "Report/KindEduReport.aspx";
        if (reportName.Trim().Equals("SECTIONSET"))
            s = "Report/SectionEduReport.aspx";
        if (reportName.Trim().Equals("DISTRIBUTION"))
            s = "Report/DistributionEduReport.aspx";
        if (reportName.Trim().Equals("SCOREPOINTSET"))
            s = "Report/ScorePointEduReport.aspx";
        if (reportName.Trim().Equals("SCHOOLSCORE"))
            s = "Report/SelectScoreEducation.aspx";
        if (reportName.Trim().Equals("SCHOOLPOSITION"))
            s = "Report/SelectPositionEducation.aspx";
        return s;
    }
}
